/**
 * Created by xiebang
 * Description
 * User:小谢
 * Date:2021-09-28
 * Time:19:25
 */

public class  TestDemo {
    public static void main(String[] args) {
        TestBinaryTree tree = new TestBinaryTree();
        Node root = tree.createTree();
//        tree.noInOrderTraversal(root);
//        System.out.println();
//        tree.inOrderTraversal(root);
//        System.out.println();
        tree.postOrderTraversalNor(root);
        System.out.println();
        tree.postOrderTraversal(root);
        System.out.println();
//        tree.nopreOrderTraversal(root);
//        System.out.println();
//        tree.preOrderTraversal(root);
//        System.out.println();
//        tree.levelOrderTraversal(root);
//        System.out.println();
    }
    public static void main3(String[] args) {
        TestBinaryTree tree = new TestBinaryTree();
        Node root = tree.createTree();
        tree.getLeafSize1(root);
        System.out.println(TestBinaryTree.leafSize);
        System.out.println(tree.getLeafSize2(root));
        System.out.println(tree.getKleveSize(root, 3));
        System.out.println(tree.getKleveSize(root, 5));
        System.out.println(tree.getHeight(root));
        System.out.println(tree.find(root, 'O'));

    }
    public static void main2(String[] args) {
        TestBinaryTree tree = new TestBinaryTree();
        Node root = tree.createTree();
        tree.getSize11(root);
        System.out.println(TestBinaryTree.size);
        System.out.println(tree.getSize2(root));
    }
    public static void main1(String[] args) {
        TestBinaryTree tree = new TestBinaryTree();
        Node root = tree.createTree();
        tree.preOrderTraversal(root);
        System.out.println();
        tree.inOrderTraversal(root);
        System.out.println();
        tree.postOrderTraversal(root);
        System.out.println();

    }


}
